﻿using System.Text.Json.Serialization;

namespace GeometryLib
{
    public class MaterialDataLib
    {
        public MaterialData[] Materials { get; set; } = new MaterialData[] { };
    }

    public class MaterialData
    {
        /// <summary>
        /// 材料牌号/名称
        /// </summary>
        public string SpecNo { get; set; } = "20#";

        public int PubYear { get; set; } = 0;

        public string Size { get; set; } = "<=16";
        /// <summary>
        /// 规范名称
        /// </summary>
        public string Code { get; set; } = "GB/T 8163";

        /// <summary>
        /// 数据类型 AllowableStress 许用应力 ; YieldStrength 屈服强度
        /// </summary>
        public string Type { get; set; } = "许用应力";

        public double[] Temperatures { get; set; }= new double[0];
        public double[] Values { get; set; } = new double[0];

        [JsonIgnore]
        public string ToName => $"{Code} {SpecNo} {Size}";
    }
}
